/*
 * @Author: Superficial
 * @Date: 2021-09-17 20:41:34
 * @LastEditTime: 2022-06-01 00:49:17
 * @Description: 键值对模型
 */
import { prop } from '@typegoose/typegoose'
import { IsString, IsNotEmpty } from 'class-validator'

export class KeyValueModel {
  @IsString()
  @IsNotEmpty()
  @prop({ required: false, validate: /\S+/ })
  name: string

  @IsString()
  @IsNotEmpty()
  @prop({ required: false, validate: /\S+/ })
  value: string
}
